feat: add MemoryClient for control plane + data plane passthrough#108
Open
Hweinstock wants to merge 1 commit intoaws:mainfrom
Open
feat: add MemoryClient for control plane + data plane passthrough#108Hweinstock wants to merge 1 commit intoaws:mainfrom
Hweinstock wants to merge 1 commit intoaws:mainfrom
Conversation
d2979e0 to
b4de70e
Compare
b4de70e to
33131b3
Compare
33131b3 to
348f528
Compare
348f528 to
2cf0750
Compare
2cf0750 to
c313fd0
Compare
c313fd0 to
7426b20
Compare
7426b20 to
f279131
Compare
f279131 to
d52638d
Compare
d52638d to
5dac0fc
Compare
5dac0fc to
54196ff
Compare
54196ff to
3e1f10c
Compare
3e1f10c to
21ec2eb
Compare
21ec2eb to
7ccb703
Compare
7ccb703 to
05cfe89
Compare
05cfe89 to
3a62c5d
Compare
3a62c5d to
27f582e
Compare
27f582e to
680233d
Compare
jariy17
reviewed
Mar 19, 2026
| return Array.from(branches.values()) | ||
| } | ||
|
|
||
| memory(memoryId: string): ScopedMemory { |
Contributor
There was a problem hiding this comment.
I like this design, but I dont understand the benefits of having a ScopeMemory. Could you explain why a customer just provide the memoryId themselves each time they call createEvent and similar functions?
Contributor
Author
There was a problem hiding this comment.
mostly verbosity, there is no reason they can't manually provide an ID each time. I saw it as concise way to combine a memory-scoped client, and a raw SDK client into a single interface. The same functionality is split between clients in the existing python implementation.
Happy to leave it out, if we think its awkward/wont be used.
71ebaf4 to
680233d
Compare
680233d to
c28b662
Compare
c28b662 to
18dd5ee
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add MemoryClient for Bedrock AgentCore Memory, covering both control plane and data plane operations.
Uses a Proxy with declaration merging to expose a curated set of AWS SDK methods as direct passthroughs on the client.
.memory(memoryId)returns a scoped ScopedMemory that auto-injects the memoryId into every call, reducing repetition when operating on a single memory.Convenience methods for common workflows:
createOrGetMemory— idempotent create (falls back to get on conflict)createMemoryAndWait/deleteMemoryAndWait— polling wrapperswaitForMemories— polls until LTM extraction produces recordsgetLastKTurns— retrieves the last K conversation turns grouped by USER boundarieslistBranches— aggregates branch info from eventsCore design decisions vs Python SDK:
NOTE: Not yet published into the vended SDK, no entry in the package.json exports map. Will be added once integration tests are in place.
Testing
Unit tests use dependency injection (injectable SDK clients via
MemoryClientConfig) with simple fakes to avoid mocks. Tests verify:Type of Change
New feature
Checklist
#125
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.